const webpackCommon = require('./webpack.common')
const webpackDev = require('./webpack.dev')
const webpackProd = require('./webpack.prod')
const { merge } = require('webpack-merge')

module.exports = (mode) => {
  if (mode === 'development') {
    return merge(webpackCommon, webpackDev)
  }
  return merge(webpackCommon, webpackProd)
}
